import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:ws_group_chat/pages/home_page.dart';
import 'package:ws_group_chat/provider/client_data.dart';
import 'package:ws_group_chat/provider/host_data.dart';
import 'package:provider/provider.dart';

void main() {
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MultiProvider(
      providers: [
        ChangeNotifierProvider(create: (context) => HostData()),
        ChangeNotifierProvider(create: (context) => ClientData()),
      ],
      child: MaterialApp(home: HomePage(), builder: EasyLoading.init()),
    );
  }
}
